﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />

<div class="modal-dialog" role="document" style="width: 600px;">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span>
      </button>
      <h4 class="modal-title"><fmt:message key="assessor.64" /> <fmt:message key="assessor.378" /></h4>
    </div>
    
    <form class="form-horizontal" action="${ctx.host}/sessions/${sessionCalibration.session.id}/peer-calibrations/${sessionCalibration.id}/edit-competency-evaluation" method="POST" data-validate="true">
      <input type="hidden" name="_method" value="PATCH">
      <div class="modal-body competency-box">
        <c:forEach var="competency" items="${competencies}">
          <div class="form-group">
            <label for="inputEmail3" class="col-sm-4 control-label"><fmt:message key="${competency.message}" />:</label>
            <div class="col-sm-8">
              <input type="hidden" name="competencyName" value="${competency.name}">
              <select name="competencyResult" class="select2 form-control" style="width: 250px;" data-validate="required">
                <option></option>
                <c:forEach var="score" items="${enums['SessionAnchorScoreType']}">
                  <c:if test="${score != 'WARN'}">
                    <option value="${score}" ${competency.score eq score ? 'selected' : ''}>${score.alias}</option>
                  </c:if>
                </c:forEach>
              </select>
            </div>
          </div>
        </c:forEach>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><fmt:message key="assessor.460" /></button>
        <button type="submit" class="btn btn-success" style="background: #70AD47;"><fmt:message key="assessor.462" /></button>
      </div>
    </form>
  </div>
</div>